package com.hulk.dryad;



import com.hulk.dryad.web.oauth2.base.annotation.EnableDryadResourceServer;
import lombok.extern.slf4j.Slf4j;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;


import java.util.Arrays;

/**
 * @author hulk
 */
@Slf4j
@EnableDryadResourceServer
@SpringBootApplication
public class ApplicationBootstrap {

	public static void main(String[] args) {

		// java -jar xxx.jar --spring.profiles.active=dev 命令启动具体的环境参数
		ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder()
				.sources(ApplicationBootstrap.class).run(args);
		String[] activeProfiles = applicationContext.getEnvironment().getActiveProfiles();
		log.info("service started successfully." + "\r\n" + "The following profiles are active: "
				+ Arrays.toString(activeProfiles));
	}

}
